<!--
 * @Description: 子系统模块
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2024-03-07
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2024-04-03
-->
<script lang="ts" setup>
  import { useRoute } from 'vue-router'

  import { getSubModuleRoute } from '/@/router/index'

  const route = useRoute()
  const param = Object.entries(route.query)
    .map((item) => item.join('='))
    .join('&')
  const path = getSubModuleRoute(route.path) + (param ? '?' + param : '')
</script>

<template>
  <div class="sub-module">
    <iframe class="iframe" :src="path"></iframe>
  </div>
</template>

<style lang="less" scoped>
  .sub-module {
    height: 100%;
  }

  .iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
</style>
